﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Dashboard
{
    public partial class Main : System.Web.UI.MasterPage
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            string m_userName = this.Page.User.Identity.Name;

            Console.WriteLine(m_userName);

            MembershipUser m_user = Membership.GetUser(m_userName, true);

            if (m_user == null)
            {
                Membership.CreateUser(m_userName, "thepassword");
            }
            else
            {
                //m_user.IsOnline = true;

                // Membership.UpdateUser(m_user);
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}